package edu.gdkm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class UserController {
    @RequestMapping("/logincheck")
    public String logincheck(Model model, String username, String password){
        if("admin".equals(username) && "123456".equals(password)){
            model.addAttribute("name",username);
            return "index";
        }else{
            return "redirect:/login.jsp";
        }
    }
    @RequestMapping("/register")
    public String register(String username ,String password){
        System.out.println("用户名："+username + ",密码:"+password);
        return "index";
    }

    }


